#!/usr/bin/env python
 
from socket import *
from time import ctime

#HOST = '192.168.199.179'
HOST = '127.0.0.1'
PORT = 9999 
ADDR = (HOST, PORT) 

udpClientSock = socket(AF_INET,SOCK_DGRAM)

while True:
	data = raw_input('>')
	if not data:
		break
		
	udpClientSock.sendto(data,ADDR)
	data,ADDR = udpClientSock.recvfrom(1024)
	if not data:
		break
	print data

udpClientSock.close()
